#!perl -T

use Test::More tests => 4;
use Test::Output;

use Data::PrintUtils qw(:ALL);

stdout_like {print_pid("Hello")} qr/Hello/, "print_pid - no decoration";
$Data::PrintUtils::USE_PIDS = 1;
$Data::PrintUtils::USE_TIME = 0;
stdout_like {print_pid("Hello")} qr/.*:\sHello/, "print_pid - just PID";
$Data::PrintUtils::USE_PIDS = 0;
$Data::PrintUtils::USE_TIME = 1;
stdout_like {print_pid("Hello")} qr/.*\..*:\sHello/, "print_pid - just time";
$Data::PrintUtils::USE_PIDS = 1;
$Data::PrintUtils::USE_TIME = 1;
stdout_like {print_pid("Hello")} qr/.*:.*\..*\sHello/, "print_pid - PID and time";

